﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="FileMng.aspx.cs" Inherits="TONLI.TJOA.Anquan.FileMng" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v7.3, Version=7.3.5.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v7.3, Version=7.3.5.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="ComponentArt.Web.UI" Namespace="ComponentArt.Web.UI" TagPrefix="ComponentArt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link href="~/common/toolbarStyle.css" type="text/css" rel="stylesheet" />
    <link href="~/common/folder_grid.css" rel="stylesheet" type="text/css" />
    <link href="~/common/dialog.css" rel="stylesheet" type="text/css" />
    <link href="~/common/treeviewStyle.css" rel="stylesheet" type="text/css" />
    <link href="~/common/splitterStyle.css" type="text/css" rel="stylesheet" />
    <link href="~/common/calendarStyle.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript">
    var txtArray;
    var nCols;
    var funcs;
    var parentid=null;
    var objEdit=null;
    var isNew=false;
    function init(){
    return;
        funcs = TONLI.TJOA.FileMng;
        
        nCols =2;
        txtArray =new Array();
        for(i=0;i<nCols;i++){
            txtArray[i] = document.getElementById('txt'+i);  
        }
        //d=funcs.GetDate2().value;
        
        //PickerAndCalendar1_Picker1_setDate(d);
        //query();
    }
    var bodyWidth;
    function resizeHeight(){
    }
    function add(){
       
       location.href="FileAdd.aspx?dwid="+Request("dwid"); 
    }

 function Request(strName){
var strHref = document.location.href;
var intPos = strHref.indexOf("?");
var strRight = strHref.substr(intPos + 1);
var arrTmp = strRight.split("&");
for(var i = 0; i < arrTmp.length; i++ ) {
var arrTemp = arrTmp[i].split("=");
if(arrTemp[0].toUpperCase() == strName.toUpperCase()) return arrTemp[1];
}
return 0;
}



    function dialog2Cancel(){
        Dialog2.close();
    }
    function query(){
    location.href="BGS_Mng.aspx";
    }
     function ShowDetail(pram1)
    {
        window.open(pram1);
    }
      function ShowDetail2(pram1)
    {
//        location.href="FileEdit.aspx?uid="+pram1;
        window.open(pram1);
    }
  
    </script>

</head>
<body style="background-color: #e5f2ff; margin: 0px; overflow: hidden;" onload="init()">
    <form id="form1" runat="server">
        <div style="width: 100%;" class="h1">
            <img id="FolderGridHeadingImage" src="../common/images/treeview/file.gif" alt="无图片" />
            <div id="FolderGridHeadingText" style="display: inline; padding-left: 6px;">
                文件管理</div>
        </div>
        <div>
            <ComponentArt:ToolBar ID="ToolBar1" CssClass="TopToolBar" DefaultItemTextImageRelation="ImageBeforeText"
                DefaultItemImageHeight="16" DefaultItemImageWidth="16" ImagesBaseUrl="../common/top_panel_images/"
                ItemSpacing="0" Orientation="Horizontal" UseFadeEffect="false" runat="server">
                <Items>
                    <ComponentArt:ToolBarItem CssClass="TopToolBarCustomItem" ItemType="Separator" ImageUrl="toolbar_end_left.gif"
                        ImageWidth="7" ImageHeight="25" />
                    <ComponentArt:ToolBarItem CssClass="TopToolBarImageTextItem" HoverCssClass="TopToolBarImageTextItemHover"
                        ActiveCssClass="TopToolBarImageTextItemActive" ImageUrl="reply.gif" Text="上传文件"
                        ClientSideCommand="add()"></ComponentArt:ToolBarItem>
                    <ComponentArt:ToolBarItem CssClass="TopToolBarCustomItem" ItemType="Separator" ImageUrl="toolbar_end_right.gif"
                        ImageWidth="13" ImageHeight="25" />
                </Items>
            </ComponentArt:ToolBar>
            <dxwgv:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False"
                CssFilePath="~/App_Themes/Office2003 Blue/{0}/styles.css" CssPostfix="Office2003_Blue"
                DataSourceID="ObjectDataSource1" KeyFieldName="UID" OnRowDeleting="ASPxGridView1_RowDeleting"
                Width="750px" OnHtmlRowCreated="ASPxGridView1_HtmlRowCreated1" OnRowUpdating="ASPxGridView1_RowUpdating">
                <SettingsText ConfirmDelete="确实要删除该记录吗？" EmptyDataRow="暂时没有记录！" PopupEditFormCaption="科室自评分"
                    Title="科室自评分" CommandCancel="取消"></SettingsText>
                <SettingsPager PageSize="14">
                    <Summary Position="Right" Text="第{0}页,共{1}页(共{2}条)"></Summary>
                </SettingsPager>
                <Images ImageFolder="~/App_Themes/Office2003 Blue/{0}/">
                    <ExpandedButton Height="12px" Width="11px" Url="~/App_Themes/Office2003 Blue/GridView/gvExpandedButton.png">
                    </ExpandedButton>
                    <CollapsedButton Height="12px" Width="11px" Url="~/App_Themes/Office2003 Blue/GridView/gvCollapsedButton.png">
                    </CollapsedButton>
                    <DetailCollapsedButton Height="12px" Width="11px" Url="~/App_Themes/Office2003 Blue/GridView/gvCollapsedButton.png">
                    </DetailCollapsedButton>
                    <DetailExpandedButton Height="12px" Width="11px" Url="~/App_Themes/Office2003 Blue/GridView/gvExpandedButton.png">
                    </DetailExpandedButton>
                </Images>
                <Settings ShowFilterRow="True"></Settings>
                <SettingsEditing EditFormColumnCount="3" PopupEditFormHorizontalAlign="Center" PopupEditFormWidth="600px"
                    Mode="PopupEditForm"></SettingsEditing>
                <Styles CssPostfix="Office2003_Blue" CssFilePath="~/App_Themes/Office2003 Blue/{0}/styles.css">
                    <EditFormColumnCaption Wrap="False">
                    </EditFormColumnCaption>
                    <LoadingPanel ImageSpacing="10px">
                    </LoadingPanel>
                    <Header SortingImageSpacing="5px" ImageSpacing="5px">
                    </Header>
                </Styles>
                <SettingsBehavior ConfirmDelete="True" AllowFocusedRow="True"></SettingsBehavior>
                <Templates>
                    <EditForm>
                        <div>
                            <dxwgv:ASPxGridViewTemplateReplacement ID="ASPxGridViewEditor" runat="server" ReplacementType="EditFormEditors">
                            </dxwgv:ASPxGridViewTemplateReplacement>
                        </div>
                        <div align="right">
                            <dxwgv:ASPxGridViewTemplateReplacement ID="UpdateButton" runat="server" ReplacementType="EditFormUpdateButton">
                            </dxwgv:ASPxGridViewTemplateReplacement>
                            <dxwgv:ASPxGridViewTemplateReplacement ID="CancelButton" runat="server" ReplacementType="EditFormCancelButton">
                            </dxwgv:ASPxGridViewTemplateReplacement>
                        </div>
                    </EditForm>
                </Templates>
                <Columns>
                    <dxwgv:GridViewCommandColumn Caption="删除" VisibleIndex="0" Width="10%">
                        <UpdateButton Text="保存">
                        </UpdateButton>
                        <DeleteButton Text="删除" Visible="True">
                        </DeleteButton>
                        <ClearFilterButton Visible="True" Text="清除条件">
                        </ClearFilterButton>
                        <EditButton Text="修改">
                        </EditButton>
                        <NewButton Text="新增">
                        </NewButton>
                    </dxwgv:GridViewCommandColumn>
                    <dxwgv:GridViewDataTextColumn Caption="下载" VisibleIndex="1">
        <DataItemTemplate>
            <dxe:ASPxHyperLink ID="ASPxHyperLink2" runat="server" Text="下载">
            </dxe:ASPxHyperLink>
        </DataItemTemplate>
    </dxwgv:GridViewDataTextColumn>
                    <dxwgv:GridViewDataMemoColumn Caption="文件名称" FieldName="FileName" Name="col2" ReadOnly="True"
                        VisibleIndex="2" Width="30%">
                        <PropertiesMemoEdit NullDisplayText="请填写编号" Rows="4">
                            <ValidationSettings CausesValidation="True">
                                <RequiredField IsRequired="True" />
                            </ValidationSettings>
                        </PropertiesMemoEdit>
                        <DataItemTemplate>
                            <dxe:ASPxHyperLink ID="ASPxHyperLink1" runat="server" Text='<%# Eval("FileName") %>'>
                            </dxe:ASPxHyperLink>
                        </DataItemTemplate>
                    </dxwgv:GridViewDataMemoColumn>
                    <dxwgv:GridViewDataTextColumn Caption="类别" FieldName="hz" Name="col1" ReadOnly="True"
                        VisibleIndex="3" Width="10%">
                    </dxwgv:GridViewDataTextColumn>
                    <dxwgv:GridViewDataSpinEditColumn Caption="上传人" FieldName="CreateUser" Name="col3"
                        ReadOnly="True" VisibleIndex="4" Width="10%">
                        <PropertiesSpinEdit DisplayFormatString="g" NullDisplayText="请填写姓名" NumberFormat="Custom">
                            <ValidationSettings CausesValidation="True">
                                <RequiredField IsRequired="True" />
                            </ValidationSettings>
                        </PropertiesSpinEdit>
                    </dxwgv:GridViewDataSpinEditColumn>
                    <dxwgv:GridViewDataSpinEditColumn Caption="上传时间" FieldName="CreateDate" Name="num1"
                        VisibleIndex="5" Width="10%">
                        <PropertiesSpinEdit DisplayFormatString="g" NumberFormat="Custom">
                        </PropertiesSpinEdit>
                    </dxwgv:GridViewDataSpinEditColumn>
                    <dxwgv:GridViewDataTextColumn Caption="文件大小(字节)" FieldName="FileLength" VisibleIndex="6"
                        Width="10%">
                    </dxwgv:GridViewDataTextColumn>
                    <dxwgv:GridViewDataTextColumn Caption="备注" FieldName="Notes" VisibleIndex="7" Width="10%">
                    </dxwgv:GridViewDataTextColumn>
                    <dxwgv:GridViewDataTextColumn Caption="作者" FieldName="Col3" VisibleIndex="8" Width="10%">
                    </dxwgv:GridViewDataTextColumn>
                </Columns>
            </dxwgv:ASPxGridView>
            &nbsp;</div>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetListMng"
            TypeName="TONLI.TJOA.Anquan.FileMng" DeleteMethod="Delete">
            <DeleteParameters>
                <asp:SessionParameter SessionField="obj_id" Name="obj_id"></asp:SessionParameter>
            </DeleteParameters>
        </asp:ObjectDataSource>
    </form>
</body>
</html>
